<template>
	<view class="h-full text-white">
		<view class="p-6">
			<view class="text-md">{{$t('safe.xinmima')}}</view>
			<view class="p-2 rounded-sm my-2" style="background-color: #242424;">
				<u--input :placeholder="$t('safe.qingshuruxinmima')" border="none" color="#fff"
					v-model="form.password" type="password"></u--input>
			</view>
			<view class="my-4">
				<u-gap height="1" bgColor="#3d3d50"></u-gap>
			</view>
			<view class="text-md">{{$t('register.querenmima')}}</view>
			<view class="p-2 rounded-sm my-2" style="background-color: #242424;">
				<u--input :placeholder="$t('safe.qingquerenmima')" border="none" color="#fff"
					v-model="form.aginpassword" type="password"></u--input>
			</view>
			<view class="my-4">
				<u-gap height="1" bgColor="#3d3d50"></u-gap>
			</view>
			<view class="text-md">{{$t('safe.youxiangyanzhengma')}}</view>
			<view class="my-2 flex items-center justify-between gap-1">
				<view class="p-2 rounded-sm" style="background-color: #242424;">
					<u--input :placeholder="$t('safe.qingshuruyzm')" border="none" color="#fff"
						v-model="form.code"></u--input>
				</view>
				<u-button :text="$t('register.huoquyanzhengma')" color="#242424" style="width: 200rpx;"></u-button>
			</view>
			<view class="my-4">
				<u-gap height="1" bgColor="#3d3d50"></u-gap>
			</view>
			<view class="py-4">
				<u-button :text="$t('safe.querenxiugai')" shape="circle" @click="registerFn"></u-button>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapGetters,
		mapActions
	} from 'vuex'
	export default {
		computed: {
			...mapGetters(['userInfo', 'api', 'config']),
		},
		data() {
			return {
				form: {
					password: '', // 密码
					aginpassword: '', // 密码
					tikuanPassword: '', // 提款密码
					jgm: '', // 机构码
				},
			}
		},
		onLoad(op) {},
		methods: {
			registerFn() {
				if (!this.form.email) {
					this.showMsg(this.$t('login.qingshuryx'))
					return
				}
				if (!this.agree[0]) {
					this.showMsg(this.$t('register.qingyuedubingtyxd'))
					return
				}
				if (!this.image) {
					this.showMsg(this.$t('register.tuxingyanzheng'))
					return
				}
				if (!this.code) {
					this.showMsg(this.$t('register.yanzhengma'))
					return
				}
				
			},
			showMsg(msg) {
				uni.showToast({
					title: msg,
					icon: 'none'
				});
			},
			checkboxChange(e){
				console.log(e);
			}

		}
	}
</script>

<style lang="scss" scoped>
	::v-deep .u-checkbox__icon-wrap--square{
		border-radius: 100%!important;
	}

</style>